cmake_minimum_required(VERSION 3.19)

set(TARGET rust_lib_demo)

# 设置编译标志以禁用 strip
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strip-debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strip-debug")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=none -Wl,--no-strip-all")

project(${TARGET})

set(CMAKE_CXX_STANDARD 17)

include_directories(${CMAKE_SOURCE_DIR}/)

add_library(${TARGET} SHARED IMPORTED)

#message("lib path: ${CMAKE_CURRENT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/librust_lib_demo.so")

#/app/src/main/cpp/CMakeLists.txt
#set_target_properties(${TARGET} PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/librust_lib_demo.so)